# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=soapy-bladerf
pkgver=0.4.1
pkgrel=0
pkgdesc="Soapy SDR plugin for the Blade RF"
url="https://github.com/pothosware/SoapyBladeRF"
arch="all"
license="LGPL-2.1-only"
makedepends="cmake samurai soapy-sdr-dev bladerf-dev"
source="https://github.com/pothosware/SoapyBladeRF/archive/refs/tags/soapy-bladerf-$pkgver/soapy-bladerf-$pkgver.tar.gz"
builddir="$srcdir/SoapyBladeRF-soapy-bladerf-$pkgver"
options="!check" # needs hardware to test

build() {
	cmake -G Ninja -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=MinSizeRel
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
73cd5c56b6f2faa37fb8eb8aca359061fd2da94fb081c1eb60f61894385f5f0175c9e3955835dc38478e513b0fd5a15fd100123be89e4ad62a0b7134557ab73e  soapy-bladerf-0.4.1.tar.gz
"
